<%@ page language="java" contentType="text/html;charset=UTF-8"
	pageEncoding="UTF-8"%>
<%--<%@ include file="/inc/loginCheck.jsp" %>--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="/WEB-INF/orgtree.tld" prefix="oo"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <%
     String relevantDataId=request.getParameter("relevantDataId")==null?"applicationdeparid":request.getParameter("relevantDataId");
     String relevantDataName=request.getParameter("relevantDataName")==null?"applicationdeparname":request.getParameter("relevantDataName");
   	String divid = request.getParameter("divid")==null?"divTree":request.getParameter("divid");
    %>
    <title>My JSP 'testiframe.jsp' starting page</title>
    <link rel="stylesheet" type="text/css" href="<%=path%>/css/newPage.css">
    <script type="text/javascript">
    	function saveBm(){
    	
    		var tempName = document.frames["treeframe"].document.getElementById("redioNameTemp").value;
    		
    		var tempId =  document.frames["treeframe"].document.getElementById("redioIdTemp").value;
    		
    		window.parent.document.getElementById("<%=relevantDataName%>").value=tempName;
    		
    		window.parent.document.getElementById("<%=relevantDataId%>").value=tempId;
    		
			window.parent.document.getElementById("<%=divid%>").style.display="none";
			
    	}
	</script>
    <oo:treeScriptIndex formName="form1" hiddenIds="hiddenIds" useIds="true" hiddenNames="hiddenNames" useNames="true"/>
  </head>
  
  <body topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>
  <f:view>   
  <h:form id="form1">
  <f:loadBundle basename="com.synchroflow.frame.admin.resource.LocalStrings" var="msg"/>
  	  <table width="90%" align="center" cellpadding="0" cellspacing="0">
	  	<tr height="15">
	    <td background="<%=path%>/images/line02.gif">
	    </td>
	  	</tr>
		</table>
    <TABLE width="90%" align="center">
    <TR>
    <TD><iframe id="treeframe" frameborder="0" name="tree" src="orgTreeServlet?trace=o/1&amp;iframe=/common/commonUser/bmOrgtree.jsp" style="height:280;width=240"></iframe></TD>
    </TR>
    </TABLE>
	  <table width="90%" align="center" cellpadding="0" cellspacing="0">
	  	<tr height="15">
	    <td background="<%=path%>/images/line02.gif">
	    </td>
	  	</tr>
		</table>
	 <table width="90%" align="center" cellpadding="0" cellspacing="0">
		  <tr>
			  <td align="right">
			    <h:inputText id="hiddenIds" value="#{treeManagerBean.participantStr}" style="display:none"/>
			    <h:inputText id="hiddenNames" value="#{treeManagerBean.participantStr}" style="display:none"/>
		     <h:commandButton onclick="saveBm()" value="确 定"></h:commandButton>
		     </td>
		 </tr>
	 </table>
	 </h:form>
	 </f:view>
  </body>
</html>
